/*
 * Shop.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.bean;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/** 店铺 Bean */
public class Shop {

    /** 当前已经被收藏 */
    public static final int HAS_COLLECTION = 1;

    public static final float LEVEL_LOW = 2.0f;

    public static final float LEVEL_NORMAL = 3.5f;

    /** 购物车选择/未选择的标记 */
    private boolean isSelected;

    /** 总价：优惠前价格 */
    @SerializedName("sub_total")
    private float subTotal;

    /** 优惠的价格 */
    @SerializedName("discount")
    private float discount;

    /** 优惠后价格 */
    @SerializedName("discount_sub_total")
    private String discountSubTotal;

    /** 红包id */
    @Expose
    @SerializedName("bonus_id")
    private int bonusId;

    @SerializedName("status")
    private String status;

    @SerializedName("address")
    private String address;

    @SerializedName("shop_name")
    private String shopName;

    @SerializedName("shop_address")
    private String shopAddress;

    @SerializedName("qq")
    private String qq;

    @SerializedName("goods_number")
    private int goodsNumber;

    @SerializedName("goods_info")
    private List<Goods> goodsInfo;

    @SerializedName("service_phone")
    private String servicePhone;

    @SerializedName("seles_num")
    private int selesNum;

    @SerializedName("comment_rand")
    private float commentRand;

    @SerializedName("server")
    private float server;

    @SerializedName("shipping")
    private float shipping;

    @SerializedName("user_id")
    private String userId;

    @SerializedName("city")
    private String city;

    @SerializedName("tel")
    private String tel;

    @SerializedName("licensed")
    private String licensed;

    @Expose
    @SerializedName("supplier_id")
    private String supplierId;

    @SerializedName("supplier_name")
    private String supplierName;

    @SerializedName("shop_logo")
    private String shopLogo;

    @SerializedName("avg_comment")
    private float avgComment;

    @SerializedName("avg_server")
    private float avgServer;

    @SerializedName("avg_shipping")
    private float avgShipping;

    @SerializedName("goods_num")
    private int goodsNum;

    @SerializedName("salenum")
    private int salenum;

    @SerializedName("id")
    private String id;

    @SerializedName("url")
    private String url;

    /** 优惠 */
    @SerializedName("favourable_amount")
    private float favourableAmount;

    /** 配送费送 */
    @SerializedName("shipping_fee")
    private float shippingFee;

    /** 红包的价格 */
    @SerializedName("bonus_money")
    private float bonusMoney;

    /**
     * 店铺优惠活动列表
     *
     * <p>如果是多商品满赠的情况(abc送J,efg送Q),就会有多个活动出现
     */
    @SerializedName("favourable_list")
    private List<FavourableInfo> favourableInfoList;

    /** 店铺所有的赠品价格 */
    private float totalGiftPrice;

    /** 店铺优惠信息 */
    @SerializedName("favourable_info")
    private FavourableInfo favourableInfo;

    /** 是否是购物车编辑模式 */
    private boolean isEditMode;

    /** 配送方式的id */
    @SerializedName("fee_id")
    private String feeId;

    /** 配送方式的名称 */
    @SerializedName("shipping_name")
    private String shippingName;

    /** 不满足运费减免时的总运费 */
    @SerializedName("logistics_fee")
    private float logisticsFee;

    /** 减免运费的条件 */
    @SerializedName("free_money")
    private float logisticsFreeMoney;

    /** 当前店铺的运费.用户购物车计算运费 */
    private float totalLogisticsMoney;

    public String getFeeId() {
        return feeId;
    }

    public void setFeeId(String feeId) {
        this.feeId = feeId;
    }

    public String getShippingName() {
        return shippingName;
    }

    public void setShippingName(String shippingName) {
        this.shippingName = shippingName;
    }

    public float getTotalLogisticsMoney() {
        return totalLogisticsMoney;
    }

    public void setTotalLogisticsMoney(float totalLogisticsMoney) {
        this.totalLogisticsMoney = totalLogisticsMoney;
    }

    public float getLogisticsFee() {
        return logisticsFee;
    }

    public void setLogisticsFee(float logisticsFee) {
        this.logisticsFee = logisticsFee;
    }

    public float getLogisticsFreeMoney() {
        return logisticsFreeMoney;
    }

    public void setLogisticsFreeMoney(float logisticsFreeMoney) {
        this.logisticsFreeMoney = logisticsFreeMoney;
    }

    public FavourableInfo getFavourableInfo() {
        return favourableInfo;
    }

    public void setFavourableInfo(FavourableInfo favourableInfo) {
        this.favourableInfo = favourableInfo;
    }

    public float getTotalGiftPrice() {
        return totalGiftPrice;
    }

    public void setTotalGiftPrice(float totalGiftPrice) {
        this.totalGiftPrice = totalGiftPrice;
    }

    public int getBonusId() {
        return bonusId;
    }

    public void setBonusId(int bonusId) {
        this.bonusId = bonusId;
    }

    public List<FavourableInfo> getFavourableInfoList() {
        return favourableInfoList;
    }

    public void setFavourableInfoList(List<FavourableInfo> favourableInfoList) {
        this.favourableInfoList = favourableInfoList;
    }

    public float getSubTotal() {
        return subTotal;
    }

    public void setSubTotal(float subTotal) {
        this.subTotal = subTotal;
    }

    public float getDiscount() {
        return discount;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    public String getDiscountSubTotal() {
        return discountSubTotal;
    }

    public void setDiscountSubTotal(String discountSubTotal) {
        this.discountSubTotal = discountSubTotal;
    }

    public float getFavourableAmount() {
        return favourableAmount;
    }

    public void setFavourableAmount(float favourableAmount) {
        this.favourableAmount = favourableAmount;
    }

    public float getShippingFee() {
        return shippingFee;
    }

    public void setShippingFee(float shippingFee) {
        this.shippingFee = shippingFee;
    }

    public boolean isEditMode() {
        return isEditMode;
    }

    public void setEditMode(boolean editMode) {
        isEditMode = editMode;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopAddress() {
        return shopAddress;
    }

    public void setShopAddress(String shopAddress) {
        this.shopAddress = shopAddress;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public int getGoodsNumber() {
        return goodsNumber;
    }

    public void setGoodsNumber(int goodsNumber) {
        this.goodsNumber = goodsNumber;
    }

    public List<Goods> getGoodsInfo() {
        return goodsInfo;
    }

    public void setGoodsInfo(List<Goods> goodsInfo) {
        this.goodsInfo = goodsInfo;
    }

    public String getServicePhone() {
        return servicePhone;
    }

    public void setServicePhone(String servicePhone) {
        this.servicePhone = servicePhone;
    }

    public int getSelesNum() {
        return selesNum;
    }

    public void setSelesNum(int selesNum) {
        this.selesNum = selesNum;
    }

    public float getCommentRand() {
        return commentRand;
    }

    public void setCommentRand(float commentRand) {
        this.commentRand = commentRand;
    }

    public float getServer() {
        return server;
    }

    public void setServer(float server) {
        this.server = server;
    }

    public float getShipping() {
        return shipping;
    }

    public void setShipping(float shipping) {
        this.shipping = shipping;
    }

    public String getShopLogo() {
        return shopLogo;
    }

    public void setShopLogo(String shopLogo) {
        this.shopLogo = shopLogo;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getLicensed() {
        return licensed;
    }

    public void setLicensed(String licensed) {
        this.licensed = licensed;
    }

    public float getAvgComment() {
        return avgComment;
    }

    public void setAvgComment(float avgComment) {
        this.avgComment = avgComment;
    }

    public float getAvgServer() {
        return avgServer;
    }

    public void setAvgServer(float avgServer) {
        this.avgServer = avgServer;
    }

    public float getAvgShipping() {
        return avgShipping;
    }

    public void setAvgShipping(float avgShipping) {
        this.avgShipping = avgShipping;
    }

    public int getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(int goodsNum) {
        this.goodsNum = goodsNum;
    }

    public int getSalenum() {
        return salenum;
    }

    public void setSalenum(int salenum) {
        this.salenum = salenum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Shop shop = (Shop) o;

        return supplierId.equals(shop.supplierId);
    }

    @Override
    public int hashCode() {
        return supplierId.hashCode();
    }

    public float getBonusMoney() {
        return bonusMoney;
    }

    public void setBonusMoney(float bonusMoney) {
        this.bonusMoney = bonusMoney;
    }
}
